//企业简历详情基本信息
import React, { Component } from 'react'
import {
    View,
    Text,
} from 'react-native';

import { Cresumeintention_Style as styles } from '../../../../styles';
import Icon from 'react-native-vector-icons/Ionicons';

export default class Cresume_intention extends Component {
    constructor(props) {
        super(props);
    }
    render() {
        return (
            <View style={styles.int_all}>

                <View style={styles.int_onetop}>
                    <View style={styles.int_topicon}>
                        <Icon
                            name={'md-clipboard'}
                            size={20}
                            color={'#ffffff'} />
                    </View>
                    <Text style={styles.int_toptext}>求职意向</Text>
                </View>

                <View style={styles.int_centerall}>

                    <View style={styles.int_eve}>
                        <Text style={styles.int_left}>期望行业</Text>
                        <Text style={styles.int_right}>{this.fieldName(this.props.fields, 9)}</Text>
                    </View>
                    <View style={styles.int_eve}>
                        <Text style={styles.int_left}>期望职能</Text>
                        <Text style={styles.int_right}>{this.props.xzResume.resumeIntentPosition}</Text>
                    </View>
                    <View style={styles.int_eve}>
                        <Text style={styles.int_left}>期望地点</Text>
                        <Text style={styles.int_right}>{this.props.xzResume.resumeIntentWorkspace}</Text>
                    </View>
                    <View style={styles.int_eve}>
                        <Text style={styles.int_left}>期望年薪</Text>
                        <Text style={styles.int_right}>{this.props.xzResume.resumeIntentMm}</Text>
                    </View>

                </View >
            </View>
        )
    }
    //期望行业：
    fieldName(List, sl) {
        let arr = '';
        if (List != undefined) {
            let s = sl;
            let length = List.length;
            if (length <= s) {
                s = length;
            }
            for (let i = 0; i < s; i++) {
                if (List[i].fieldType == '3') {
                    arr += List[i].fieldName + '/';
                }
            }
            if (arr.endsWith('/')) {
                arr = arr.substr(0, arr.length - 1);
            }
        }
        return arr;
    }
}